package com.syni.mdd.yhd.common.all.controller.protect;

import com.syni.mdd.sjb.common.component.utils.common.annotations.EntranceCheck;
import com.syni.mdd.yhd.common.all.dto.requestDto.groupBuy.GroupBuyUseReDto;
import com.syni.mdd.yhd.common.all.service.BmsDxGroupBuyUseService;
import com.syni.mdd.yhd.common.all.validationGroup.GroupCheckPaging;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className 团购
 * @description TOO
 * @Author cfx
 * @DATE 2019/7/24 16:50
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/dxGroupBuyUse")
public class BmsDxGroupBuyUseController {

    @Autowired
    BmsDxGroupBuyUseService bmsDxGroupBuyUseService;

    /**
     * @Description 获取我的卡券包列表
     * @Author: cfx
     * @Date: 2019/7/25
     */
    @PostMapping("/userGetGroupBuyUse")
    @EntranceCheck(checkAuth = true)
    public Map<String,Object> userGetGroupBuyUse(@RequestBody @Validated({GroupCheckPaging.class}) GroupBuyUseReDto groupBuyUseReDto){
        return bmsDxGroupBuyUseService.userGetGroupBuyUse(groupBuyUseReDto);
    }

}
